import { createApp } from 'vue';
import App from './App.vue';

import registGlobalComponents from './plugins/registGlobalComponents';
import setupRouter from './plugins/setupRouter';
import setupStore from './plugins/setupStore';

import './style/root.css';
import './style/global.less';

const bootstrap = () => {
  const app = createApp(App);

  // 注册全局组件
  registGlobalComponents(app);

  // 初始化 pinia
  setupStore(app);

  // 初始化路由
  // 路由要放在初始化store后面 
  setupRouter(app);

  app.mount('#app');
};

bootstrap();
